#!/bin/bash

# 同时推送到 GitHub 和 GitCode
# 使用方法: ./scripts/git-push-all.sh "提交信息"

if [ -z "$1" ]; then
  echo "❌ 请提供提交信息"
  echo "使用方法: ./scripts/git-push-all.sh \"提交信息\""
  exit 1
fi

echo "📝 提交更改..."
git add .
git commit -m "$1"

echo ""
echo "🚀 推送到 GitHub (主要)..."
git push github main

echo ""
echo "🔄 同步到 GitCode (备份)..."
git push origin main

echo ""
echo "✅ 推送完成！"
echo "📦 Netlify 将自动部署到: https://lawyerch-cn.netlify.app"
